<script setup>
import { provide, ref } from 'vue';
import FatherComp from './components/FatherComp.vue';

const money = ref(100)
const saveMoney = (newMoney) => {
  money.value += newMoney
}

// 提供数据
provide('money', money)
provide('saveMoney', saveMoney)

</script>

<template>
  <div class="app-page" style="border: 10px solid #ccc; padding: 50px; width: 600px">
    app 组件-钱包: {{ money }}
    <FatherComp />
  </div>
</template>

<style scoped></style>